<template>
  <div id="userProblem">
    <div class="left-box">
      <!-- 左边头部 -->
      <div class="left_head_box">
        <router-link to="/user/dynamic" class="head_btn_box_link"><div class="head_btn_box"><span class="head_btn_box_p" :style="selectLeftHeadBtn==1 ? selectStyle : none">收藏</span></div></router-link>
        <router-link to="/user/article" class="head_btn_box_link"><div class="head_btn_box"><span class="head_btn_box_p" :style="selectLeftHeadBtn==2 ? selectStyle : none">文章</span></div></router-link>
        <router-link to="/user/follow" class="head_btn_box_link"><div class="head_btn_box"><span class="head_btn_box_p" :style="selectLeftHeadBtn==3 ? selectStyle : none">回答</span></div></router-link>
        <div class="head_btn_box_link" :style="selectLeftHeadBtn==4 ? selectStyle : none">
          <div class="title">更多</div>
          <div class="select-box">
            <div class="title-select-box">
              <router-link to="/user/topic" class="select-font">关注的话题</router-link>
            </div>
            <div class="title-select-box">
              <router-link to="/user/problem" class="select-font">关注的问题</router-link>
            </div>
            <div class="title-select-box">
              <router-link to="/user/topic" class="select-font">关注的收藏夹</router-link>
            </div>
            <div class="title-select-box">
              <router-link to="/user/topic" class="select-font">关注的专栏</router-link>
            </div>
          </div>
        </div>
        <!--<router-link to="/user/hotList" class="head_btn_box_link"><div class="head_btn_box"><span class="head_btn_box_p" :style="selectLeftHeadBtn==5 ? selectStyle : none">文章</span></div></router-link>-->
      </div>
      <div class="left-head-name"><strong>我关注的问题</strong></div>
      <div class="problem-card" v-for="list of QuestionList">
        <div class="card-list">
          <router-link :to="'/articlePage/'+list.id" class="card-title"><strong>{{list.title}}</strong></router-link>
          <div class="card-under">{{list.question_time}} · {{list.comment_num}}个回答</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
  export default {
    name: 'userProblem',
    components: {
    },
    data () {
      return {
        list: [
          {'title': '下赛季蔡徐坤能进入NBA吗', 'time': '2018-04-05', 'number': '120'},
          {'title': '下赛季蔡徐坤能进入NBA吗', 'time': '2018-04-05', 'number': '120'},
          {'title': '下赛季蔡徐坤能进入NBA吗', 'time': '2018-04-05', 'number': '120'}
        ],
        selectLeftHeadBtn: 4,
        selectStyle: {'color': '#0084ff'},
        QuestionList: []
      }
    },
    computed: {
    },
    methods: {
    },
    created () {
      this.axios.get('/api/findFollowQuestion', {
        params: {
          phone: sessionStorage.getItem('phone')
        }
      })
        .then(res => {
          this.QuestionList = res.data.data
          console.log(res)
        })
    }
  }
</script>
<style scoped>
  @import '../../../../../static/css/user/UserProblem.css';
</style>
